home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- # postinst script for defoma
- #
- # see: dh_installdeb(1)
-
- set -e
-
- if [ "X$1" = Xconfigure ]; then
- case "X$2" in
- X0.4.12)
- echo "defoma $2 has a serious bug that cause severe data loss."
- echo "If you've ever seen a number of error messages of perl relating "
- echo "Defoma, data loss occured without doubt."
- echo "If you haven't, data loss is completely denied so no fix is needed."
- echo "Running defoma-reconfigure will fix data loss by removing all"
- echo "configuration data (that is, all files under /var/lib/defoma) and"
- echo "reconfiguring all from zero. "
- echo -n "Do you want to run defoma-reconfigure now? [Y/n] "
-
- read a
- if [ "$a" = Y -o "$a" = y -o "X$a" = X ]; then
- echo "OK. It'll take some time. Please wait."
- TEMP=`/bin/tempfile`
- echo -n "Saving /var/lib/defoma..."
- /bin/tar cvfz $TEMP /var/lib/defoma > /dev/null
- /bin/mv $TEMP /var/lib/defoma/__backup__.tgz
- echo "done. "
- echo "Stored all files under /var/lib/defoma in /var/lib/defoma/__backup__.tgz"
- echo "You can/should remove it if you've never put a file there by yourself."
- /usr/bin/defoma-reconfigure
- else
- echo "Please run defoma-reconfigure if necessary."
- fi
- ;;
- X0.8.1|X0.8.2|X0.9.0)
- if [ -f /usr/share/defoma/scripts/psfontmgr.defoma ]; then
- /bin/rm -f /var/lib/defoma/psfontmgr.d/* || true
- /bin/rm -f /var/lib/defoma/x-postscript.font-cache || true
- /usr/bin/defoma-app update psfontmgr
- fi
- ;;
- esac
- if [ "X$2" != X ]; then
- if dpkg --compare-versions "$2" lt "0.10.1"; then
- if [ -n "`/bin/ls /usr/share/defoma/scripts/*.defoma`" ]; then
- /bin/cp /usr/share/defoma/scripts/*.defoma /var/lib/defoma/scripts
- fi
- fi
- fi
- fi
-
- case "$1" in
- configure|abort-upgrade|abort-remove|abort-deconfigure)
- ;;
- *)
- exit 0
- ;;
- esac
-
- # dh_installdeb will replace this with shell code automatically
- # generated by other debhelper scripts.
-
-
-
- exit 0
-
-
-